package com.zw.yzk.kabu.internal.module;

import com.zw.yzk.kabu.data.repository.*;
import com.zw.yzk.kabu.domain.executor.ExecutionThread;
import com.zw.yzk.kabu.domain.executor.ThreadExecutor;
import com.zw.yzk.kabu.domain.interactor.DefaultUseCase;
import com.zw.yzk.kabu.domain.repository.Repository;
import com.zw.yzk.kabu.domain.repository.UseCase;
import dagger.Module;
import dagger.Provides;

import javax.inject.Named;

/**
 * Created by skydar on 2017/4/14.
 */

@Module
public class SkinModule {

    @Provides
    @Named("skinCategoryListRepository")
    Repository provideSkinCategoryListRepository(SkinCategoryListRepository repository) {
        return repository;
    }

    @Provides
    @Named("skinListRepository")
    Repository provideSkinListRepository(SkinListRepository repository) {
        return repository;
    }

    @Provides
    @Named("skinPackageRepository")
    Repository provideSkinPackageRepository(SkinPackageRepository repository) {
        return repository;
    }

    @Provides
    @Named("skinBuyFreeRepository")
    Repository provideSkinBuyFreeRepository(SkinBuyFreeRepository repository) {
        return repository;
    }

    @Provides
    @Named("skinReadyListRepository")
    Repository provideSkinReadyListRepository(SkinReadyListRepository repository) {
        return repository;
    }


    @Provides
    @Named("skinDownloadRepository")
    Repository provideSkinDownloadRepository(SkinDownloadRepository repository) {
        return repository;
    }

    @Provides
    @Named("skinCategoryListUseCase")
    UseCase provideSkinCategoryListUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("skinCategoryListRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }

    @Provides
    @Named("skinListUseCase")
    UseCase provideSkinListUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("skinListRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }

    @Provides
    @Named("skinPackageUseCase")
    UseCase provideSkinPackageUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("skinPackageRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }

    @Provides
    @Named("skinBuyFreeUseCase")
    UseCase provideSkinBuyFreeUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("skinBuyFreeRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }

    @Provides
    @Named("skinReadyListUseCase")
    UseCase provideSkinReadyListUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("skinReadyListRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }

    @Provides
    @Named("skinDownloadUseCase")
    UseCase provideSkinDownloadUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("skinDownloadRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }
}
